﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smartec.Accounts.Camel.AMS.Model;
using System.Reflection;

namespace Smartec.Accounts.Camel.AMS.Model.Facades
{
    public static class AMSManagerFacade
    {
        //public static IEnumerable<T> GetTableByName<T>(string tableName) where T : class
        //{
        //    return AMSObjectContextHelper.GetTableByName<T>(tableName);
        //}

        public static List<KeyValuePair<string, string>> GetListItems(string entityName)
        {
            return AMSObjectContextHelper.GetListItems(entityName, "", "");
        }

        public static List<KeyValuePair<string, string>> GetListItems(string entityName, string parameterName, string parameterValue)
        {
            return AMSObjectContextHelper.GetListItems(entityName, parameterName, parameterValue);
        }

        public static int? GetFieldValue(string entityName, string propertyName, int id)
        {
            return AMSObjectContextHelper.GetFieldValue(entityName, propertyName, id);
        }

        public static List<KeyValuePair<string, string>> GetListItemsByTableName(string tableName)
        {
            return AMSObjectContextHelper.GetListItemsByTableName(tableName);
        }

        public static List<KeyValuePair<string, string>> GetListItemsByMethodName(string methodName, string parameter)
        {
            return AMSObjectContextHelper.GetListItemsByMethodName(methodName, parameter);
        }

        #region GetPropertyMetaData
        public static PropertyInfo GetPropertyMetaData(PropertyInfo property)
        {
            return AMSObjectContextHelper.GetPropertyMetaData(property);
        }
        #endregion // GetPropertyMetaData
    }
}
